<link rel="stylesheet" type="text/css" href="/assets/css/tableform.css?v=2">
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

	<div class="widget-body no-padding">
		<div id="toolbar" class="toolbar">
			<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" onclick="window.location.reload()" ><i class="fa fa-refresh"></i> </a>
			<button type="button" class="btn btn-primary btn-embossed btn-close"
				onclick="Fast.api.close()">{:__('Close')}</button>
			<button type="button" class="btn btn-default btn-print btn-embossed">
				<i class="fa fa-print"></i> 打印
			</button>
			<a href="javascript:;" id="deal-btn" class="btn btn-success {:$auth->check('inventory/temporary/setting')?'':'hide'} {$row.status==1?'hidden':''}"  ><i class="fa fa-pencil"></i> {:__('Deal order')}</a>
		</div>
	</div>

<div class="printshow">
<div class="form-group">
		<h2 class="text-center">调拨单据明细</h2>
	</div>
	
	<div class="row-group my_flex justify-content-between">
		<div class="my_flex ">
			<div class="my_label_right">{:__('单据编号')}:</div>
			<div class="my_flex_flex">
				{$row.code}
        		<input type="hidden" id="id" value="{$row.temporary_id}">
			</div>
		</div>
		<div class="my_flex ">
			<div class="my_label_right">{:__('单据日期')}:</div>
			<div class="my_flex_flex">
				{$row.code_date}
			</div>
		</div>
		{if condition="$row.warehouse_id neq $row.warehouse_change_id"}
		<div class="my_flex ">
			<div class="my_label_right">{:__('原仓库')}:</div>
			<div class="my_flex_flex">
				{$row.wareHouse.name}
			</div>
			<div class="my_label_right">{:__('目标仓库')}:</div>
			<div class="my_flex_flex">
				{$row.changeWareHouse.name}
			</div>
		</div>
		{/if}
		{if condition="$row.warehouse_id eq $row.warehouse_change_id"}
		<div class="my_flex ">
			<div class="my_label_right">{:__('仓库')}:</div>
			<div class="my_flex_flex">
				{$row.wareHouse.name}
			</div>
		</div>
		{/if}
	</div>
  
  	<div class="row-group my_flex justify-content-between">
  		<div class="my_flex ">
			<div class="my_label_right">{:__('创建人')}:</div>
			<div class="my_flex_flex">
				{$row.u8username}
			</div>
		</div>
		<div class="my_flex ">
			<div class="my_label_right">{:__('创建时间')}:</div>
			<div class="my_flex_flex">
				{:substr($row.createtime,0,10)}
			</div>
		</div>
		<div class="my_flex ">
			<div class="my_label_right">{:__('单据状态')}:</div>
			<div class="my_flex_flex" style="color:red">
				{$statusListList[$row.status]}
			</div>
		</div>
	</div>

  
  <div class="row-group my_flex justify-content-between">
		<div class="my_flex ">
			<div class="my_label_right">摘要:</div>
		  <div class="my_flex_flex">{$row.remark}</div>
		</div>
	</div>

  <div style="white-space: nowrap;overflow-x: auto;width:100%">
    <table class="table fieldlist table-nowrap" data-template="basictpl" id="free-programme-item-table" data-name="row[basic]">
      <tr class="table-bordered">
        <td class="text-center table-bordered" width="100">{:__('物料编码')}</td>
        <td class="text-center table-bordered" width="200">{:__('物料名称')}</td>
        <td class="text-center table-bordered" width="100">{:__('规格型号')}</td>
		<td class="text-center table-bordered" width="100">{:__('批号')}</td>
        <td class="text-center table-bordered" width="100">{:__('基本单位')}</td>
        <td class="text-center table-bordered" width="100">{:__('数量')}</td>
		<td class="text-center table-bordered" width="100">{:__('常用单位')}</td>
		<td class="text-center table-bordered" width="100">{:__('数量')}</td>
        <td class="text-center table-bordered"  width="150">{:__('原路径')}</td>
        <td class="text-center table-bordered" width="150">{:__('调拨路径')}</td>
      </tr>
    </table>
  </div>
 </div>
  <textarea name="row[basic]" id="c-basic-textarea" class="form-control hidden" cols="30" rows="5">{$list_json}</textarea>
  <script id="basictpl" type="text/html">
    <tr class="table-bordered">
	  <td class="text-center table-bordered"><%=value?value['number']:''%></td>
      <td class="text-center table-bordered"><%=value?value['name']:''%></td>
	  <td class="text-center table-bordered"><%=value?value['specification']:''%></td>
	  <td class="text-center table-bordered"><%=value?value['cBatch']:''%></td>
	  <td class="text-center table-bordered"><%=value?value['unit']:''%></td>
 	  <td class="text-center table-bordered"><%=value?value['tp_iQuantity']:''%></td>
	   <td class="text-center table-bordered"><%=value?value['store_unit']:''%></td>
 	  <td class="text-center table-bordered"><%=value?value['store_quantity']:''%></td>
      <td class="text-center table-bordered"><%=value?value['shelves_name']:''%></td>
	  <td class="text-center table-bordered"><%=value?value['to_shelves_name']:''%></td>
    </tr>
  </script>
</form>
<style>
	.printshow {
		font-family: "Microsoft YaHei", 微软雅黑;
	}

	.printshow table {
		/* border: 2.5px solid black; */
		border:1.5px solid black;
		border-collapse: collapse;
	}
	
	.remark {
		font-size:15px;
		word-wrap:break-word; 
    	word-break:break-all;
		overflow-x: auto;
	}

	@media print {
		.printshow .tds {
			/* font-size: 50px; */
			border-bottom: 1.1px solid black;
			border-right: 1.1px solid black;
		}
	}

	@page {
		size: auto;
		margin: 3mm;
	}
	
</style>